<?php
/**
 * Custom class used by the web service to check security constraints
 */
class WebServiceSecurity
{
	/**
	 * Checks the web service security for general constraints
	 *
	 * @param array $parameters passed to the web service via GET or POST
	 * @return boolean success
	 */
	public function checkGeneralSecurity($parameters) {
		//TODO: check security, return true for passed, false for failed
		if(true){
			//security check passed
			return true;
		}
		//security check failed
		return false;
	}
	
	/**
	 * Checks the web service security for constraints on the model that is being instantiated
	 *
	 * @param DBElement $model_instance
	 * @return boolean success
	 */
	public function checkModelSecurity($parameters) {
		//TODO: check security, return true for passed, false for failed
		if(true){
			//security check passed
			return true;
		}
		//security check failed
		return false;
	}
	
	/**
	 * Gets security comments
	 *
	 * @return string
	 */
	public function getComments() {
		//TODO: return security comments
		return "TODO: SECURITY COMMENTS";
	}
	
}
?>